package com.chenyue.cm.live.domain;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 赛事 直播，指派 记录
 * </p>
 *
 * @author Lbx
 * @since 2021-10-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "JdLiveRecord对象", description = "赛事 直播，指派 记录")
public class JdLiveRecord extends Model<JdLiveRecord> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "赛事id")
    private Integer matchId;

    @ApiModelProperty(value = "主播id")
    private Integer liveId;

    @ApiModelProperty(value = "赛程id")
    private Integer arrangeId;

    @ApiModelProperty(value = "直播标题")
    private String title;

    @ApiModelProperty(value = "直播图片")
    private String liveLogo;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @ApiModelProperty(value = "赛事分类")
    private Integer matchType;

    @ApiModelProperty(value = "flv播放地址")
    private String flvPullUrl;

    @ApiModelProperty(value = "m3u8播放地址")
    private String m3u8PullUrl;

    @ApiModelProperty(value = "rtmp播放地址")
    private String rtmpPullUrl;

    @ApiModelProperty(value = "udp播放地址")
    private String udpPullUrl;

    @ApiModelProperty(value = "直播回放地址")
    private String videoUrl;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
